package com.xxx.host;
import com.tencentcloudapi.common.Credential;
import com.tencentcloudapi.common.profile.ClientProfile;
import com.tencentcloudapi.common.profile.HttpProfile;
import com.tencentcloudapi.common.exception.TencentCloudSDKException;

import com.tencentcloudapi.yunjing.v20180228.YunjingClient;

import com.tencentcloudapi.yunjing.v20180228.models.CreateUsualLoginPlacesRequest;
import com.tencentcloudapi.yunjing.v20180228.models.CreateUsualLoginPlacesResponse;

public class CreateUsualLoginPlaces//添加常用登录地


{
    public static void main(String [] args) {
        try{

            Credential cred = new Credential("AKID84pKiq1WQ4SaS4z4V5QZT93nHVUPLzOD", "Yx6zd190CDzaFfspQfw22oM5dvyreC9J");
            
            HttpProfile httpProfile = new HttpProfile();
            httpProfile.setEndpoint("yunjing.tencentcloudapi.com");

            ClientProfile clientProfile = new ClientProfile();
            clientProfile.setHttpProfile(httpProfile);            
            
            YunjingClient client = new YunjingClient(cred, "ap-chengdu", clientProfile);
            
            String params = "{\"Uuids\":[\"Uuid.0=c5e40a60-5ff5-11e9-a175-5cb9019b3cb0\"],\"Places\":[{\"CityId\":1,\"ProvinceId\":1,\"CountryId\":1}]}";
            CreateUsualLoginPlacesRequest req = CreateUsualLoginPlacesRequest.fromJsonString(params, CreateUsualLoginPlacesRequest.class);
            
            CreateUsualLoginPlacesResponse resp = client.CreateUsualLoginPlaces(req);
            
            System.out.println(CreateUsualLoginPlacesRequest.toJsonString(resp));
        } catch (TencentCloudSDKException e) {
                System.out.println(e.toString());
        }

    }
    
}